//
//  UIViewController+BarItem.h
//  KKZ
//
//  Created by  on 11-7-23.
//  Copyright 2011年 Tsinghua University. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kNavBarRigthItemFrameWithPrompt     CGRectMake(240.0f, 0.0f, 80.0f, 30.0f)
#define kNavBarRigthItemFrame               CGRectMake(250.0f, 0.0f, 60.0f, 30.0f)
#define kNavBarLeftItemFrameWithPromt       CGRectMake(  0.0f, 7.0f, 80.0f, 30.0f)
#define kNavBarLeftItemFrame                CGRectMake(  5.0f, 7.0f, 60.0f, 30.0f)

#define kNavBarItemImageDown                [UIImage imageNamed:@"navItem.png"]
#define kNavBarItemImageOn                  [UIImage imageNamed:@"navItem.png"]

#define kNavBarItemSideRight                @"right"
#define kNavBarItemSideLeft                 @"left"


@interface UIViewController (BarItem)

- (void)createBarItemOn:(NSString *)side frame:(CGRect)frame title:(NSString *)title target:(id)target action:(SEL)anAction;
- (void)addTitleToNavigationBar:(NSString *)title;
- (void)popBackToRootViewController;    
- (void)popBackToLastViewController;    

@end
